import {request} from "./request";

export function user_request(query,pageNum,pageSize) {
    return request({
        url:'/users',
        method:'get',
        params:{
            query,
            pageNum,
            pageSize
        }
    })
}

export function user_delete(id) {
    return request({
        url:'/user/delete/'+id,
        method:'get'
    })
}

export function user_editPass(id,newPassword) {
    return request({
        url:'/editPass/'+id,
        method:'put',
        params:{
            newPassword
        }
    })
}

export function user_getById(id) {
    return request({
        url:'/getUserById/'+id,
        method:'get'
    })
}

export function user_edit(id,sex,phone) {
    return request({
        url:'/editUser/'+id,
        method:'put',
        params:{
            sex,
            phone
        }
    })
}